var assert = require('assert');
var should = require('should');
var util = require('util');
var zlib = require('zlib');
var _ = require('lodash');
var farmService = require('../../app/services/farmService');
var dataApi = require('../../app/libs/dataApi');
var config = require('../config');

suite('测试farmService', function () {
    suite('getCanGainFood', function () {
        test('相应的时间内能收取到的粮食数量', function () {
            farmService.getCanGainFood(1, 100, 10000).gain_food.should.equal(5);
            farmService.getCanGainFood(1, 100, 1).gain_food.should.equal(1);
            farmService.getCanGainFood(1, 3600, 10000).gain_food.should.equal(200);
        });
    });

    suite('getCanGainFoodEverySecond', function () {
        test('获取每秒能收的粮食', function () {
            farmService.getCanGainFoodEverySecond(1).should.equal(0.05555555555555555);
        });
    });

    suite('getGainFoodNeedSecond', function () {
        test('获取相应的食物需要多少秒回复', function () {
            //farmService.getGainFoodNeedSecond(1, 1).should.equal(36);
        });
    });
});
